import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)



export default new Vuex.Store({
  state: {
    loginStatus: false,
    showNav: true,
    userInfo: {},
    employeeInfo: {},
    navList: [],
    identity: 'user',
    permissionsList: [],
    routerList:[],
    sessionId:"",
  },
  getters: {
  },
  mutations: {
    updateUserInfo(state,data) {
      state.userInfo =  data.userInfo
      state.employeeInfo =  data.employeeInfo
      state.identity =  data.identity
      state.permissionsList =  data.permissionsList
    },
    updateLoginStatus(state,data) {
      state.loginStatus =  data
 
    },
    updateSessionId(state,data) {
      state.sessionId =  data
    
    },
    updateShowNav(state, data) {
      state.showNav = data
    },
    updateNavList(state, data) {
      state.navList = data
    },
    updateRouterList(state, data) {
      state.routerList = data
    },
  },
  actions: {
  },
  modules: {
  }
})
